import logging,yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(levelname)s_%(pathname)s_%(filename)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.html')
    ])
def set_main(a):
    main=yagmail.SMTP(user='3351419687@qq.com',password='rszkepcap',host='html.qq.smtp')
    main.send(to='',subject='测试标题',contents='测试内容',attachments=a)